package hust.ioic.oa.domain;

import java.sql.Timestamp;
import java.util.HashSet;
import java.util.Set;
// 文件表
public class Rdfile implements Comparable<Rdfile> {
	private Integer id;
	private String name;
	private Integer display; // 是否可见
	private Integer type; // 文件类型  0表示文章，1表示附件

	private Integer textId; // 文章id
	private Timestamp createTime; // 创建时间
	private Integer operatorId; // 创建者id
	private String password; // 密码 

	private String remark; // 备注

	private Set<KnowType> knowTypes = new HashSet<>();
	private Set<Department> departments = new HashSet<>();

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public Integer getDisplay() {
		return display;
	}

	public void setDisplay(Integer display) {
		this.display = display;
	}

	public Integer getType() {
		return type;
	}

	public void setType(Integer type) {
		this.type = type;
	}

	public Integer getTextId() {
		return textId;
	}

	public void setTextId(Integer textId) {
		this.textId = textId;
	}

	public Timestamp getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Timestamp createTime) {
		this.createTime = createTime;
	}

	public Integer getOperatorId() {
		return operatorId;
	}

	public void setOperatorId(Integer operatorId) {
		this.operatorId = operatorId;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	public Set<Department> getDepartments() {
		return departments;
	}

	public void setDepartments(Set<Department> departments) {
		this.departments = departments;
	}

	public Set<KnowType> getKnowTypes() {
		return knowTypes;
	}

	public void setKnowTypes(Set<KnowType> knowTypes) {
		this.knowTypes = knowTypes;
	}

	@Override
	public int compareTo(Rdfile o) {
		// TODO Auto-generated method stub
		return ((Rdfile) o).getId() - this.id;
	}

}
